<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>2016春夏订货会－意见收集系统</title>

<meta name="description" content="User login page" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!-- basic styles -->

<link
	href="${pageContext.request.contextPath}/resources/bt_v3/assets/css/bootstrap.min.css"
	rel="stylesheet" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/bt_v3/assets/css/font-awesome.min.css" />

<!--[if IE 7]>
		  <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/bt_v3/assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

<!-- page specific plugin styles -->

<!-- fonts -->

<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/bt_v3/assets/css/ace-fonts.css" />

<!-- ace styles -->

<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/bt_v3/assets/css/ace.min.css" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/bt_v3/assets/css/ace-rtl.min.css" />


<!-- ace settings handler -->

<script src="${pageContext.request.contextPath}/resources/bt_v3/assets/js/ace-extra.min.js"></script>

<!--[if lte IE 8]>
		  <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/bt_v3/assets/css/ace-ie.min.css" />
		<![endif]-->

<!-- inline styles related to this page -->

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

<!--[if lt IE 9]>
		<script src="${pageContext.request.contextPath}/resources/bt_v3/assets/js/html5shiv.js"></script>
		<script src="${pageContext.request.contextPath}/resources/bt_v3/assets/js/respond.min.js"></script>
		<![endif]-->
<style type="text/css">


.table td {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	vertical-align: middle;
	text-align: center;
	
}
.tdClass {
	color: red;
	
}
</style>
</head>

<body>
<div class="container-fluid">
  <div class="row">
  	<div class="col-xs-12">
	    <table class="table table-striped table-bordered ">
	    	<tr>
	    		<td colspan="11"><h3>2016春夏订货会-意见收集表（商品）</h3>${sessionScope.userSession.sysUser.nickName }[${sessionScope.userSession.sysUser.company }]</td>
	    	</tr>
	    	<tr>
	    		<td colspan="11" style="text-align: left;">
						说明：<br />
						1、整体评价-“5分”评价最高，“1分”评价最低  <br />
						2、意见填写参考要素：价格带、颜色、面料、款式、风格、领型、褶型 <br />
	    		</td>
	    	</tr>
	    	<tr>
	    		<td colspan="11">
	    			<div class="input-group">
						<span class="input-group-btn">
							&nbsp;&nbsp;
							分标&nbsp;<select id="jconf">
											<option value="4">JOEONE</option>
											<option value="3">J1</option>
									   </select>
							&nbsp;&nbsp;
							<button type="button" class="btn btn-purple btn-sm" id="btn_search">
								查找
								<i class="icon-search icon-on-right bigger-110"></i>
							</button>
							&nbsp;&nbsp;&nbsp;&nbsp;	
							<a class="btn btn-purple btn-sm" id="btn_downloadStat" href="#" >
								导出
								<i class="icon-download-alt icon-on-right bigger-110"></i>
							</a>
						</span>
					</div>
				</td>
	    	</tr>
	    	<tr>
	    		<td rowspan="2">大类</td>
	    		<td rowspan="2">JOE系列名称</td>
	    		<td rowspan="2">序号</td>
	    		<td colspan="2">整体评价</td>
	    		<td colspan="2">后期新品-重点补充品类</td>
	    		<td colspan="4">意见填写（请填入文字说明，紫色为已填写，灰色为未填写）</td>
	    	</tr>
	    	<tr>
	    		<td>有效作答数</td>
	    		<td>平均分</td>
	    		<td>是</td>
	    		<td>否</td>
	    		<td>价格</td>
	    		<td>颜色</td>
	    		<td>版型</td>
	    		<td>其他</td>
	    	</tr>
	    	<tbody id="statView">
	    		<tr>
	    			<td rowspan="8">内搭类</td>
	    			<td id="jclass_18">长袖T恤</td>
	    			<td >1</td>
	    			<td id="num_18">0</td>
	    			<td id="avg_18">0</td>
	    			<td id="isbc1_18">0</td>
	    			<td id="isbc0_18">0</td>
	    			<td id="jgnote_18">&nbsp;</td>
	    			<td id="ysnote_18">&nbsp;</td>
	    			<td id="bxnote_18">&nbsp;</td>
	    			<td id="qtnote_18">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_17">休闲长袖衬衫</td>
	    			<td >2</td>
	    			<td id="num_17">0</td>
	    			<td id="avg_17">0</td>
	    			<td id="isbc1_17">0</td>
	    			<td id="isbc0_17">0</td>
	    			<td id="jgnote_17">&nbsp;</td>
	    			<td id="ysnote_17">&nbsp;</td>
	    			<td id="bxnote_17">&nbsp;</td>
	    			<td id="qtnote_17">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_20">针织长袖衬衫</td>
	    			<td >3</td>
	    			<td id="num_20">0</td>
	    			<td id="avg_20">0</td>
	    			<td id="isbc1_20">0</td>
	    			<td id="isbc0_20">0</td>
	    			<td id="jgnote_20">&nbsp;</td>
	    			<td id="ysnote_20">&nbsp;</td>
	    			<td id="bxnote_20">&nbsp;</td>
	    			<td id="qtnote_20">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_22">正装长袖衬衫</td>
	    			<td >4</td>
	    			<td id="num_22">0</td>
	    			<td id="avg_22">0</td>
	    			<td id="isbc1_22">0</td>
	    			<td id="isbc0_22">0</td>
	    			<td id="jgnote_22">&nbsp;</td>
	    			<td id="ysnote_22">&nbsp;</td>
	    			<td id="bxnote_22">&nbsp;</td>
	    			<td id="qtnote_22">&nbsp;</td>
	    		</tr>
	    		
	    		<tr>
	    			<td id="jclass_4">短袖T恤</td>
	    			<td >5</td>
	    			<td id="num_4">0</td>
	    			<td id="avg_4">0</td>
	    			<td id="isbc1_4">0</td>
	    			<td id="isbc0_4">0</td>
	    			<td id="jgnote_4">&nbsp;</td>
	    			<td id="ysnote_4">&nbsp;</td>
	    			<td id="bxnote_4">&nbsp;</td>
	    			<td id="qtnote_4">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_15">休闲短袖衬衫</td>
	    			<td >6</td>
	    			<td id="num_15">0</td>
	    			<td id="avg_15">0</td>
	    			<td id="isbc1_15">0</td>
	    			<td id="isbc0_15">0</td>
	    			<td id="jgnote_15">&nbsp;</td>
	    			<td id="ysnote_15">&nbsp;</td>
	    			<td id="bxnote_15">&nbsp;</td>
	    			<td id="qtnote_15">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_19">针织短袖衬衫</td>
	    			<td >7</td>
	    			<td id="num_19">0</td>
	    			<td id="avg_19">0</td>
	    			<td id="isbc1_19">0</td>
	    			<td id="isbc0_19">0</td>
	    			<td id="jgnote_19">&nbsp;</td>
	    			<td id="ysnote_19">&nbsp;</td>
	    			<td id="bxnote_19">&nbsp;</td>
	    			<td id="qtnote_19">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_21">正装短袖衬衫</td>
	    			<td >8</td>
	    			<td id="num_21">0</td>
	    			<td id="avg_21">0</td>
	    			<td id="isbc1_21">0</td>
	    			<td id="isbc0_21">0</td>
	    			<td id="jgnote_21">&nbsp;</td>
	    			<td id="ysnote_21">&nbsp;</td>
	    			<td id="bxnote_21">&nbsp;</td>
	    			<td id="qtnote_21">&nbsp;</td>
	    		</tr>
	    		
	    		<tr>
	    			<td rowspan="7">外套类</td>
	    			<td id="jclass_7">毛衫</td>
	    			<td >9</td>
	    			<td id="num_7">0</td>
	    			<td id="avg_7">0</td>
	    			<td id="isbc1_7">0</td>
	    			<td id="isbc0_7">0</td>
	    			<td id="jgnote_7">&nbsp;</td>
	    			<td id="ysnote_7">&nbsp;</td>
	    			<td id="bxnote_7">&nbsp;</td>
	    			<td id="qtnote_7">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_3">单西</td>
	    			<td >10</td>
	    			<td id="num_3">0</td>
	    			<td id="avg_3">0</td>
	    			<td id="isbc1_3">0</td>
	    			<td id="isbc0_3">0</td>
	    			<td id="jgnote_3">&nbsp;</td>
	    			<td id="ysnote_3">&nbsp;</td>
	    			<td id="bxnote_3">&nbsp;</td>
	    			<td id="qtnote_3">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_5">风衣</td>
	    			<td >11</td>
	    			<td id="num_5">0</td>
	    			<td id="avg_5">0</td>
	    			<td id="isbc1_5">0</td>
	    			<td id="isbc0_5">0</td>
	    			<td id="jgnote_5">&nbsp;</td>
	    			<td id="ysnote_5">&nbsp;</td>
	    			<td id="bxnote_5">&nbsp;</td>
	    			<td id="qtnote_5">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_1">便装</td>
	    			<td >12</td>
	    			<td id="num_1">0</td>
	    			<td id="avg_1">0</td>
	    			<td id="isbc1_1">0</td>
	    			<td id="isbc0_1">0</td>
	    			<td id="jgnote_1">&nbsp;</td>
	    			<td id="ysnote_1">&nbsp;</td>
	    			<td id="bxnote_1">&nbsp;</td>
	    			<td id="qtnote_1">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_10">茄克</td>
	    			<td >13</td>
	    			<td id="num_10">0</td>
	    			<td id="avg_10">0</td>
	    			<td id="isbc1_10">0</td>
	    			<td id="isbc0_10">0</td>
	    			<td id="jgnote_10">&nbsp;</td>
	    			<td id="ysnote_10">&nbsp;</td>
	    			<td id="bxnote_10">&nbsp;</td>
	    			<td id="qtnote_10">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_11">套西</td>
	    			<td >14</td>
	    			<td id="num_11">0</td>
	    			<td id="avg_11">0</td>
	    			<td id="isbc1_11">0</td>
	    			<td id="isbc0_11">0</td>
	    			<td id="jgnote_11">&nbsp;</td>
	    			<td id="ysnote_11">&nbsp;</td>
	    			<td id="bxnote_11">&nbsp;</td>
	    			<td id="qtnote_11">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_6">混合外套</td>
	    			<td >15</td>
	    			<td id="num_6">0</td>
	    			<td id="avg_6">0</td>
	    			<td id="isbc1_6">0</td>
	    			<td id="isbc0_6">0</td>
	    			<td id="jgnote_6">&nbsp;</td>
	    			<td id="ysnote_6">&nbsp;</td>
	    			<td id="bxnote_6">&nbsp;</td>
	    			<td id="qtnote_6">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td rowspan="6">裤类</td>
	    			<td id="jclass_2">便装裤</td>
	    			<td >16</td>
	    			<td id="num_2">0</td>
	    			<td id="avg_2">0</td>
	    			<td id="isbc1_2">0</td>
	    			<td id="isbc0_2">0</td>
	    			<td id="jgnote_2">&nbsp;</td>
	    			<td id="ysnote_2">&nbsp;</td>
	    			<td id="bxnote_2">&nbsp;</td>
	    			<td id="qtnote_2">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_12">西裤</td>
	    			<td >17</td>
	    			<td id="num_12">0</td>
	    			<td id="avg_12">0</td>
	    			<td id="isbc1_12">0</td>
	    			<td id="isbc0_12">0</td>
	    			<td id="jgnote_12">&nbsp;</td>
	    			<td id="ysnote_12">&nbsp;</td>
	    			<td id="bxnote_12">&nbsp;</td>
	    			<td id="qtnote_12">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_16">休闲裤</td>
	    			<td >18</td>
	    			<td id="num_16">0</td>
	    			<td id="avg_16">0</td>
	    			<td id="isbc1_16">0</td>
	    			<td id="isbc0_16">0</td>
	    			<td id="jgnote_16">&nbsp;</td>
	    			<td id="ysnote_16">&nbsp;</td>
	    			<td id="bxnote_16">&nbsp;</td>
	    			<td id="qtnote_16">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_9">牛仔裤</td>
	    			<td >19</td>
	    			<td id="num_9">0</td>
	    			<td id="avg_9">0</td>
	    			<td id="isbc1_9">0</td>
	    			<td id="isbc0_9">0</td>
	    			<td id="jgnote_9">&nbsp;</td>
	    			<td id="ysnote_9">&nbsp;</td>
	    			<td id="bxnote_9">&nbsp;</td>
	    			<td id="qtnote_9">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_14">休闲短裤</td>
	    			<td >20</td>
	    			<td id="num_14">0</td>
	    			<td id="avg_14">0</td>
	    			<td id="isbc1_14">0</td>
	    			<td id="isbc0_14">0</td>
	    			<td id="jgnote_14">&nbsp;</td>
	    			<td id="ysnote_14">&nbsp;</td>
	    			<td id="bxnote_14">&nbsp;</td>
	    			<td id="qtnote_14">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_8">牛仔短裤</td>
	    			<td >21</td>
	    			<td id="num_8">0</td>
	    			<td id="avg_8">0</td>
	    			<td id="isbc1_8">0</td>
	    			<td id="isbc0_8">0</td>
	    			<td id="jgnote_8">&nbsp;</td>
	    			<td id="ysnote_8">&nbsp;</td>
	    			<td id="bxnote_8">&nbsp;</td>
	    			<td id="qtnote_8">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td rowspan="5">外饰类</td>
	    			<td id="jclass_25">领带</td>
	    			<td >22</td>
	    			<td id="num_25">0</td>
	    			<td id="avg_25">0</td>
	    			<td id="isbc1_25">0</td>
	    			<td id="isbc0_25">0</td>
	    			<td id="jgnote_25">&nbsp;</td>
	    			<td id="ysnote_25">&nbsp;</td>
	    			<td id="bxnote_25">&nbsp;</td>
	    			<td id="qtnote_25">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_26">皮带</td>
	    			<td >23</td>
	    			<td id="num_26">0</td>
	    			<td id="avg_26">0</td>
	    			<td id="isbc1_26">0</td>
	    			<td id="isbc0_26">0</td>
	    			<td id="jgnote_26">&nbsp;</td>
	    			<td id="ysnote_26">&nbsp;</td>
	    			<td id="bxnote_26">&nbsp;</td>
	    			<td id="qtnote_26">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_27">鞋类</td>
	    			<td >24</td>
	    			<td id="num_27">0</td>
	    			<td id="avg_27">0</td>
	    			<td id="isbc1_27">0</td>
	    			<td id="isbc0_27">0</td>
	    			<td id="jgnote_27">&nbsp;</td>
	    			<td id="ysnote_27">&nbsp;</td>
	    			<td id="bxnote_27">&nbsp;</td>
	    			<td id="qtnote_27">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_28">包类</td>
	    			<td >25</td>
	    			<td id="num_28">0</td>
	    			<td id="avg_28">0</td>
	    			<td id="isbc1_28">0</td>
	    			<td id="isbc0_28">0</td>
	    			<td id="jgnote_28">&nbsp;</td>
	    			<td id="ysnote_28">&nbsp;</td>
	    			<td id="bxnote_28">&nbsp;</td>
	    			<td id="qtnote_28">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td id="jclass_29">配饰类</td>
	    			<td >26</td>
	    			<td id="num_29">0</td>
	    			<td id="avg_29">0</td>
	    			<td id="isbc1_29">0</td>
	    			<td id="isbc0_29">0</td>
	    			<td id="jgnote_29">&nbsp;</td>
	    			<td id="ysnote_29">&nbsp;</td>
	    			<td id="bxnote_29">&nbsp;</td>
	    			<td id="qtnote_29">&nbsp;</td>
	    		</tr>
	    	</tbody>
	    </table>
    </div>
  </div>
  
<div class="ace-settings-container" id="ace-settings-container">
						<div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
							<i class="icon-cog bigger-150"></i>
						</div>

						<div class="ace-settings-box" id="ace-settings-box">
							

							<div>
								<input type="radio"  id="report_vote1" name="report_vote" checked="true"/>
								<label class="lbl" for="report_vote1"> 意见汇总表</label>
							</div>
							<div>
								<input type="radio"  id="report_vote2" name="report_vote"/>
								<label class="lbl" for="report_vote2"> 人员分布表</label>
							</div>
						</div>
					</div><!-- /#ace-settings-container -->
</div>
<form action="${pageContext.request.contextPath}/admin/joeoneCode/downloadStat.do" id="hidden_form">
	<input type="hidden" name="jclassName" id="jclassName" />
	<input type="hidden" name="jclassId" id="jclassId"/>
	<input type="hidden" name="jsubjectName" id="jsubjectName"/>
	<input type="hidden" name="jsubjectId" id="jsubjectId"/>
</form>
	<!-- basic scripts -->
	<!--[if !IE]> -->

	<script type="text/javascript">
		window.jQuery
				|| document
						.write("<script src='${pageContext.request.contextPath}/resources/bt_v3/assets/js/jquery-2.0.3.min.js'>"
								+ "<"+"/script>");
	</script>

	<!-- <![endif]-->

	<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='${pageContext.request.contextPath}/resources/bt_v3/assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

	<script type="text/javascript">
		if ("ontouchend" in document)
			document
					.write("<script src='${pageContext.request.contextPath}/resources/bt_v3/assets/js/jquery.mobile.custom.min.js'>"
							+ "<"+"/script>");
	</script>
<script src="${pageContext.request.contextPath}/resources/bt_v3/assets/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/bt_v3/assets/js/typeahead-bs2.min.js"></script>


		
		
<script src="${pageContext.request.contextPath}/resources/bt_v3/assets/js/ace-elements.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/bt_v3/assets/js/ace.min.js"></script>

	<script type="text/javascript">
	function fn_getSubject() {
		var data = new Object();
		data['docStatus'] = "11";
		data['pageNo'] = "1";
		data['pageSize'] = "10";
		$.ajax({
					url : "${pageContext.request.contextPath}/admin/joeoneSubject/list.do",
					async : true,
					dataType : 'json',
					type : 'GET',
					data : data,
					success : function(data, textStatus) {
						$.each(data.data.listData, function(i, item) {
							$("#jsubject").append("<option value='"+item.docId+"'>"+item.docSubject+"</option>");
						}); 
					},
					error : function(jqXHR, textStatus, errorThrown) {
						var sessionstatus=jqXHR.getResponseHeader("sessionstatus");
						if(sessionstatus == "timeout"){
							alert("[timeout]您登陆已经超时，请重新登陆!");
							var req_address = "${pageContext.request.contextPath}/joeone/ipad/index_dhVote.jsp";
							window.location.href  = req_address;
						}
					}

		});
			
		

	}
		
		
		function fn_search() {
			var jconf = $('#jconf').val();
			
			var data = new Object();
			data['jconf'] = jconf;
			//清空展示数据
			$.each($("td[id^='num_']"), function(i,val){  	
						$(this).text("0");
			});
			$.each($("td[id^='avg_']"), function(i,val){  	
						$(this).text("0");
			});
			$.each($("td[id^='isbc1_']"), function(i,val){  	
						$(this).text("0");
			});
			$.each($("td[id^='isbc0_']"), function(i,val){  	
						$(this).text("0");
			});
			$.each($("td[id^='jgnote_']"), function(i,val){  	
						$(this).text("");
			});
			$.each($("td[id^='ysnote_']"), function(i,val){  	
						$(this).text("");
			});
			$.each($("td[id^='bxnote_']"), function(i,val){  	
						$(this).text("");
			});
			$.each($("td[id^='qtnote_']"), function(i,val){  	
						$(this).text("");
			});
			$.ajax({
						url : "${pageContext.request.contextPath}/admin/dhVote/getStat.do",
						async : true,
						dataType : 'json',
						type : 'GET',
						data : data,
						success : function(rtn, textStatus) {
							$.each(rtn.data.listData, function(i, item) {
								$("#num_"+item.jclass).text(item.num_user);
								$("#avg_"+item.jclass).text(parseFloat(item.avg_pj).toFixed(2));
								$("#isbc1_"+item.jclass).text(item.isbc);
								$("#isbc0_"+item.jclass).text(item.num_user-item.isbc);
								$("#jgnote_"+item.jclass).text(item.jgnote);
								$("#ysnote_"+item.jclass).text(item.ysnote);
								$("#bxnote_"+item.jclass).text(item.bxnote);
								$("#qtnote_"+item.jclass).text(item.qtnote);
							}); 
							
						},
						error : function(jqXHR, textStatus, errorThrown) {
							var sessionstatus=jqXHR.getResponseHeader("sessionstatus");
							if(sessionstatus == "timeout"){
								alert("[timeout]您登陆已经超时，请重新登陆!");
								var req_address = "${pageContext.request.contextPath}/joeone/ipad/index_dhVote.jsp";
								window.location.href  = req_address;
							}
						}
	
			});
		}
		function fn_chck() {
			
			if($(this).attr("id") == "report_vote1"){
				var req_address = "${pageContext.request.contextPath}/joeone/ipad/admin_dhVote.jsp";
				window.location.href  = req_address;
			}else if($(this).attr("id") == "report_vote2"){
				var req_address = "${pageContext.request.contextPath}/joeone/ipad/admin_dhUser.jsp";
				window.location.href  = req_address;
			}
			

		}
		function fn_downloadStat() {
			var data = new Object();
			
			var req_address = "${pageContext.request.contextPath}/admin/dhVote/downloadStat.do?jconf="+$('#jconf').val();
		
			window.location.href  = req_address;
			
		}
		$(document).ready(function() {
			$("#btn_search").bind("click", fn_search);
			$("#report_vote1").bind("click", fn_chck);
			$("#report_vote2").bind("click", fn_chck);

			$("#btn_downloadStat").bind("click", fn_downloadStat);

		});
	</script>

</body>
</html>